import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import "@/assets/base.css"

import ElementUI from 'element-ui'; // 2.1引入结构
import 'element-ui/lib/theme-chalk/index.css'; // 2.2引入样式

import * as L from 'leaflet'
// import 'Leaflet.AnimatedMarker-master/src/AnimatedMarker'
// import 'Leaflet.PolylineDecorator-master/dist/leaflet.polylineDecorator'
// import 'Leaflet.MovingMarker-master/MovingMarker.js'
// 必须引进leaflet.css样式 否则会错位
import 'leaflet/dist/leaflet.css'
import { Radar,radar } from "@panzhiyue/leaflet.radar";

// 修改页面名称
router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})

// 挂载leaflet 到实例对象Vue上
Vue.prototype.$L = L

Vue.config.productionTip = false

Vue.use(ElementUI); // 3.安装

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
